package com.xjtu.platform.reader.impl;

import com.xjtu.platform.reader.NewService;
import com.xjtu.platform.reader.dao.NewDao;
import com.xjtu.platform.reader.newEntity.ClassListEntity;
import com.xjtu.platform.reader.newEntity.LabelAndClass;
import com.xjtu.platform.reader.newEntity.LabelListEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@Service
@Transactional
public class NewServiceImpl implements NewService {

    @Resource
    private NewDao newDao;
    @Override
    public LabelAndClass getLabelAndClass() {
        List<ClassListEntity> classList = newDao.getClassList();
        List<LabelListEntity> labelListEntities = newDao.getLabelList();
        LabelAndClass labelAndClass = new LabelAndClass();
        labelAndClass.setClassListEntity(classList);
        labelAndClass.setLabelListEntity(labelListEntities);
        return labelAndClass;
    }
}
